﻿using Abp.Domain.Entities.Auditing;
using FutureApp.Users;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FutureApp.Shop
{
    /// <summary>
    /// 订单
    /// </summary>
    [Table("OrderReceiptDetails")]
    public class OrderReceiptDetail : FullAuditedEntity<Guid, User>
    {
        /// <summary>
        /// 商品Id
        /// </summary>
        public Guid GoodsId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [Range(0, int.MaxValue)]
        public int Quantity { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        [Range(0, double.MaxValue)]
        [DecimalPrecision(18, 8)]
        public decimal Price { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        [Range(0, double.MaxValue)]
        [DecimalPrecision(18, 8)]
        public decimal Amount { get; set; }
    }
}
